/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package Dao;

import Interface.InterfaceFIAS;
import Pojo.Addrobj;
import java.util.List;
import org.hibernate.Query;
import org.hibernate.Session;

/**
 *
 * @author olegk
 */
public class DaoFIAS implements InterfaceFIAS{

    @Override
    public List<Addrobj> selectListOrganizationName(Session session, String hql, List<Object> param) throws Exception {
        Query query=session.createQuery(hql);
        for(Object inParam:param){
            query.setParameter(param.indexOf(inParam), inParam);
        }       
        List<Addrobj> listOrganization =(List<Addrobj>) query.list();        
        return listOrganization;
    }
    
}
